home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15331 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  37 lines

  1. Path: news.interpath.net!softbase
  2. From: softbase@mercury.interpath.com (Scott McMahan - Softbase Systems)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: dos.h equivalent in gcc or cc ?
  5. Date: 18 Apr 1996 14:25:31 GMT
  6. Organization: Interpath -- Providing Internet access to North Carolina
  7. Distribution: inet
  8. Message-ID: <4l5jcr$de1@news.interpath.net>
  9. References: <3173B701.41C6@ieec.fcr.es>
  10. NNTP-Posting-Host: mercury.interpath.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Oscar Chic (chic@ieec.fcr.es) wrote:
  14. : I'm trying to pass arguments to a function with _argv and _argc
  15. : global variables that Borland 4.5 permits.
  16. : In Borland you must do an include of dos.h
  17. : Which is the equivalent in gcc or cc in a UNIX WS ?
  18. : Which file must I include to do the same ?
  19.  
  20. This sounds like someone has been bitten by non-standard,
  21. non-portable usage. It's generally easy to work around things
  22. like this and bzero() using tricks.
  23.  
  24. Just declare them and then make them have the same values as
  25. were passed in through the correct variables. 
  26.  
  27. -*-
  28.  
  29. int _argc;
  30. char **argv;
  31.  
  32. int main(int argc, char **argv) {
  33.  
  34.     _argv = argv; _argc = argc;
  35. }
  36.  
  37.